export function getArgv(cmds: string[]) {
    let temps = cmds.slice(2);
    let argv: { [key: string]: string[] } = {}
    for (let i = 0; i < temps.length; i += 2) {
        if (temps[i].substr(0, 1) == '-') {
            let str = temps[i + 1]
            let temp;
            if (str.indexOf(',') < 0) {
                if (str.indexOf(' ') >= 0) {
                    temp = str.split(' ');
                }else{
                    temp = [str];
                }
            } else {
                temp = str.split(',');
            }
            argv[temps[i]] = temp;
        }
    }
    return argv;
}